The first thing that stands out to me is that you used 12 gauge wire on a tandem axle setup when it's 10 gauge wire that is widely considered to be the minimum. I'd maybe try going up to 10 gauge wire like # 10-1-1 and you should see the issue go away as the wiring is probably just not able to handle the amperage needed.
The brake magnets can be wired in either configuration so the issue you mentioned would not be the problem either. But also check for any bare wire touching metal of the... view full answer...